package com.zuihai.app.mvp.model.api.my;

import com.zuihai.app.mvp.model.entity.AboutData;
import com.zuihai.app.mvp.model.entity.AliPayResponse;
import com.zuihai.app.mvp.model.entity.BackgroundResult;
import com.zuihai.app.mvp.model.entity.BaseJson;
import com.zuihai.app.mvp.model.entity.BaseJsonList;
import com.zuihai.app.mvp.model.entity.BaseJsonNoArray;
import com.zuihai.app.mvp.model.entity.BaseMain;
import com.zuihai.app.mvp.model.entity.BaseMainClass;
import com.zuihai.app.mvp.model.entity.BaseMainObjectClass;
import com.zuihai.app.mvp.model.entity.BlackListResult;
import com.zuihai.app.mvp.model.entity.Detail;
import com.zuihai.app.mvp.model.entity.DetailWallet;
import com.zuihai.app.mvp.model.entity.MessageResponse;
import com.zuihai.app.mvp.model.entity.MessageResult;
import com.zuihai.app.mvp.model.entity.MyBaseModelResult;
import com.zuihai.app.mvp.model.entity.MyDealResult;
import com.zuihai.app.mvp.model.entity.MyFriendData;
import com.zuihai.app.mvp.model.entity.MyHomeResult;
import com.zuihai.app.mvp.model.entity.MyNumberResult;
import com.zuihai.app.mvp.model.entity.MyWalletList;
import com.zuihai.app.mvp.model.entity.MyWalletMainClass;
import com.zuihai.app.mvp.model.entity.OrderResult;
import com.zuihai.app.mvp.model.entity.OtherFriendData;
import com.zuihai.app.mvp.model.entity.PrivateMainClass;
import com.zuihai.app.mvp.model.entity.RenzhengMainClass;
import com.zuihai.app.mvp.model.entity.RewardUser;
import com.zuihai.app.mvp.model.entity.UserGroup;
import com.zuihai.app.mvp.model.entity.WXPayResponse;
import com.zuihai.app.mvp.model.entity.WalletDetailData;
import com.zuihai.app.mvp.model.entity.ad.GuanggaoApply;
import com.zuihai.app.mvp.model.entity.ad.GuanggaoDetailData;
import com.zuihai.app.mvp.model.entity.ad.MyAdListData;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2017/5/5 0005.
 */

public interface IMy {

    /**
     * 举报新接口举报
     *
     * @param id
     * @param userId
     * @param inform
     * @return
     */
    @FormUrlEncoded
    @POST("Jubao_clickInq")
    Observable<MessageResponse> requestInform(@Field("tiaomu_id") String id,
                                              @Field("my_id") String userId,
                                              @Field("content") String inform,
                                              @Field("type") String type);

    /**
     * 请求今日头条详情
     *
     * @param id     头条ID
     * @param userId 用户ID
     * @return
     */
    @FormUrlEncoded
    @POST("Tiaomu_clickInq")
    Observable<BaseJson<Detail>> requestHeadline(@Field("id") String id,
                                                 @Field("my_id") String userId);

    /**
     * 获取敬酒
     *
     * @param id     详情ID
     * @param userId 用户ID
     * @return
     */
    @FormUrlEncoded
    @POST("DashangInq")
    Observable<BaseJson<RewardUser>> requestRewardUsers(@Field("tiaomu_id") String id,
                                                        @Field("my_id") String userId,
                                                        @Field("releaser_id") String releaseId,
                                                        @Field("ispage")int ispage,
                                                        @Field("page") int page);


    /**
     * 删除评论
     */
    @FormUrlEncoded
    @POST("Shuoshuo_Pinglun_DeleteInq")
    Observable<MessageResponse> deleteComment(@Field("id") String id);


    /**
     * 评论点赞
     *
     * @param id       被点赞ID
     * @param userId   用户ID
     * @param isFavour 1:点赞，2：取消点赞
     * @return
     */
    @FormUrlEncoded
    @POST("Dianzan_clickInq?type=3")
    Observable<MessageResponse> commentFavour(@Field("tiaomu_id") String id,
                                              @Field("my_id") String userId,
                                              @Field("cancel") int isFavour,
                                              @Field("releaser_id") String releaserId
    );


    /**
     * 回复评论
     *
     * @return
     */
    @FormUrlEncoded
    @POST("AddHuifu")
    Observable<BaseJson<Detail.ReplyComment>> replyComment(@Field("releaser_id") String releaserId,
                                                           @Field("tiaomu_id") String id,
                                                           @Field("my_id") String userId,
                                                           @Field("content") String content,
                                                           @Field("be_huifu_id") String beihuifu,
                                                           @Field("picture") String picture);

    //请求朋友分组
    @FormUrlEncoded
    @POST("Get_Celebrity")
    Observable<BaseJsonList<OtherFriendData>> lanmuOther(@Field("my_id") String my_id,
                                                   @Field("yonghu_Tag") String yonghu_Tag,
                                                   @Field("page") int page);

    //请求朋友分组
    @FormUrlEncoded
    @POST("UserGroups_Inq")
    Observable<BaseJsonList<UserGroup>> userGroup(@Field("id") String id);

    //跳转网页的请求广告
    @FormUrlEncoded
    @POST("Advertisement_ClickInq")
    Observable<BaseMainClass> requestAd(@Field("id") String id);

    //广告删除
    @FormUrlEncoded
    @POST("Advertisement_DeleteInq")
    Observable<BaseMainClass> deleteAd(@Field("id") String id);

    //广告上架
    @FormUrlEncoded
    @POST("Advertisement_ApplyShangjia")
    Observable<BaseMainClass> applyUp(@Field("id") String id);

    //广告下架
    @FormUrlEncoded
    @POST("Advertisement_ApplyXiajia")
    Observable<BaseMainClass> applyDown(@Field("id") String id);

    //广告详情
    @FormUrlEncoded
    @POST("Guanggao_ClickInq")
    Observable<BaseMain<GuanggaoDetailData>> guanggaoDetail(@Field("id") String guanggaoId);


    //可申请的广告列表
    @FormUrlEncoded
    @POST("GuanggaoInq")
    Observable<BaseJsonList<GuanggaoApply>> adApply(@Field("my_id") String myID);


    //请求我的广告列表页面
    @FormUrlEncoded
    @POST("Advertisement_ListInq")
    Observable<BaseJsonList<MyAdListData>> myAdList(@Field("my_id") String myID,
                                                    @Field("point") String point
    );
    // 钱包明细列表
    @FormUrlEncoded
    @POST("Get_QianbaoInq")
    Observable<BaseJsonList<DetailWallet>> requestDetailWalletList(
            @Field("my_id") String myID,
            @Field("page") int page
    );

    // 我们
    @FormUrlEncoded
    @POST("AboutInq?type=3003")
    Observable<BaseMainClass> requestMine(@Field("my_id") String myID);

    //  使用协议
    @FormUrlEncoded
    @POST("AboutInq?type=3002")
    Observable<BaseMainClass> requestProtocol(@Field("my_id") String myID);

    // 版本许可
    @FormUrlEncoded
    @POST("AboutInq?type=3001")
    Observable<BaseMainClass> requestLicense(@Field("my_id") String myID);

    // H5的网页
    @FormUrlEncoded
    @POST("AboutInq")
    Observable<BaseMainObjectClass<AboutData>> getAboutInq(@Field("type") String type);

    //添加黑名单接口
    @FormUrlEncoded
    @POST("Add_HeimingdanInq")
    Observable<BaseMainClass> requestAddBlackList(@Field("my_id") String myID,
                                                  @Field("yonghu_id") String yonghuID);

    //删除我的发布--商品服务
    @FormUrlEncoded
    @POST("Delete_MyReleaseInq")
    Observable<BaseMainClass> deleteRelease(@Field("tiaomu_id") String myID,
                                            @Field("type") String fenleiTag);

    /**
     * 请求评论
     *
     * @param id     物品ID
     * @param page   页面索引
     * @param userId 用户ID
     * @return
     */
    @FormUrlEncoded
    @POST("Pinglun_listInq")
    Observable<BaseJson<Detail.Comment>> requestAddComment(@Field("id") String id,
                                                           @Field("page") int page,
                                                           @Field("my_id") String userId);

    /**
     * 收藏头条
     *
     * @param id
     * @param userId
     * @param isCollect
     * @return
     */
    @FormUrlEncoded
    @POST("Shoucang_clickInq")
    Observable<MessageResponse> handlineCollect(
            @Field("duixiang_id") String id,
            @Field("my_id") String userId,
            @Field("type") String type,
            @Field("shoucang_Tag") boolean isCollect,
            @Field("releaser_id") String releaser_id);


    //获取背景图片
    @FormUrlEncoded
    @POST("Get_background")
    Observable<BaseJson<BackgroundResult>> getBackgroundImage(@Field("my_id") String myID);


    /**
     * 关注用户
     *
     * @param id     被关注用户ID
     * @param userId 用户ID
     * @param isCare 1:关注，2：取消关注
     * @return
     */
    @FormUrlEncoded
    @POST("AddGuanzhuInq")
    Observable<MessageResponse> requestCare(@Field("friend_id") String id,
                                            @Field("my_id") String userId,
                                            @Field("focus_Tag") int isCare);

    //获取腾讯上传视频签名
    @FormUrlEncoded
    @POST("Tencent_sign")
    Observable<BaseJsonNoArray> getTencent_sign(@Field("my_id") String myID);


    @FormUrlEncoded
    @POST("Tiaomu_clickInq")
    Observable<BaseJson<Detail>> requestPictureClick(@Field("id") String id,
                                                            @Field("my_id") String myID);


    //提现微信获取
    @FormUrlEncoded
    @POST("Tixian_clickInq")
    Observable<BaseJsonNoArray> getWeChat(@Field("my_id") String myID
    );


    //取消订单
    @FormUrlEncoded
    @POST("Cancel")
    Observable<BaseJsonNoArray> cancel(@Field("transaction_id") String myID);

    //获取钱包的内容
    @FormUrlEncoded
    @POST("MyQianbaoInq")
    Observable<MyWalletMainClass> getWalletData(@Field("my_id") String myID,
                                                @Field("page") int page);

    //获取钱包的支出
    @FormUrlEncoded
    @POST("Get_payments")
    Observable<BaseJsonList<MyWalletList>> getGetpayments(@Field("my_id") String myID,
                                                          @Field("page") int page);

    //获取钱包的收入
    @FormUrlEncoded
    @POST("Get_Balance")
    Observable<BaseJsonList<MyWalletList>> getGetBalance(@Field("my_id") String myID,
                                                         @Field("page") int page);

    //提现
    @FormUrlEncoded
    @POST("TixianInq")
    Observable<BaseMainClass> commitMoney(@Field("my_id") String myID,
                                          @Field("price") double price,
                                          @Field("ali") String  ali,
                                          @Field("ali_realName") String  name);

    //我卖出的
    @FormUrlEncoded
    @POST("MySell_clickInq")
    Observable<BaseJson<MyDealResult>> requestMySell(@Field("my_id") String myID,
                                                     @Field("page") int page);

    //我买到的
    @FormUrlEncoded
    @POST("MyBuy_clickInq")
    Observable<BaseJson<MyDealResult>> requestMyBuy(@Field("my_id") String myID,
                                                    @Field("page") int page);

    //搜索我发布的的
    @FormUrlEncoded
    @POST("Sousuo_MyReleaseInq")
    Observable<BaseJson<MyBaseModelResult>> searchMyRelease(@Field("my_id") String myID,
                                                            @Field("page") int page,
                                                            @Field("field") String field);

    //我发布总览
    @FormUrlEncoded
    @POST("MyReleaseInq")
    Observable<BaseJson<MyBaseModelResult>> requestMyRelease(@Field("my_id") String myID,
                                                             @Field("page") int page);

    //个人主页中查看用户的发布
    @FormUrlEncoded
    @POST("MyReleaseInq")
    Observable<BaseJson<MyBaseModelResult>> homepagerRelease(@Field("my_id") String myID,
                                                             @Field("page") int page,
                                                             @Field("friend_id")String friendId);

    //我发布的头条
    @FormUrlEncoded
    @POST("MyRelease_Toutiao_clickInq")
    Observable<BaseJson<MyBaseModelResult>> requestMyReleaseHeadLine(@Field("my_id") String myID,
                                                                     @Field("page") int page);

    //我发布的去处
    @FormUrlEncoded
    @POST("MyRelease_Quchu_clickInq")
    Observable<BaseJson<MyBaseModelResult>> requestMyReleaseQuchu(@Field("my_id") String myID,
                                                                  @Field("page") int page);

    //我发布的商品服务
    @FormUrlEncoded
    @POST("MyRelease_Commodity_clickInq")
    Observable<BaseJson<MyBaseModelResult>> requestMyReleaseCommodity(@Field("my_id") String myID,
                                                                      @Field("page") int page);

    //我发布的发现
    @FormUrlEncoded
    @POST("MyRelease_Faxian_clickInq")
    Observable<BaseJson<MyBaseModelResult>> requestMyReleaseFind(@Field("my_id") String myID,
                                                                 @Field("page") int page);


    //朋友---粉丝
    @FormUrlEncoded
    @POST("Friend_listInq")
    Observable<BaseJson<MyFriendData>> requestFriendFans(@Field("my_id") String myID,
                                                         @Field("page") int page);

    //朋友---推荐
    @FormUrlEncoded
    @POST("Get_tuijian_user")
    Observable<BaseJsonList<OtherFriendData>> requestFriendRecommend(@Field("my_id") String myID,
                                                                     @Field("page") int page);

    //朋友---关注的人
    @FormUrlEncoded
    @POST("Guanzhu_listInq")
    Observable<BaseJson<MyFriendData>> requestFriendAttention(@Field("my_id") String myID,
                                                              @Field("page") int page);

    //熟人
    @FormUrlEncoded
    @POST("AcquaintanceInq")
    Observable<BaseJson<MyFriendData>> requestShuren(@Field("my_id") String myID,
                                                     @Field("page") int page);

    //朋友---访客
    @FormUrlEncoded
    @POST("Fangke_listInq")
    Observable<BaseJson<MyFriendData>> requestFriendVisitor(@Field("my_id") String myID,
                                                            @Field("page") int page);

    //订单详情接口
    @FormUrlEncoded
    @POST("Order_clickInq")
    Observable<BaseJson<OrderResult>> requestOrder(@Field("my_id") String myID,
                                                   @Field("transaction_id") String transactionID);

    //泸州朋友 请求粉丝 关注数量
    @FormUrlEncoded
    @POST("My_friend_CountInq")
    Observable<BaseJson<MyNumberResult>> requestNumber(@Field("my_id") String myID);

    //我的主页接口
    @FormUrlEncoded
    @POST("ZhuyeInq")
    Observable<BaseJsonList<MyHomeResult>> requestMyHomepage(@Field("my_id") String myID,
                                                             @Field("yonghu_id") String yonghuID);

    //黑名单接口
    @FormUrlEncoded
    @POST("HeimingdanInq")
    Observable<BaseJson<BlackListResult>> requestBlackList(@Field("my_id") String myID,
                                                           @Field("page") int page);

    //移除黑名单接口
    @FormUrlEncoded
    @POST("Delect_HeimingdanInq")
    Observable<BaseMainClass> requestRemoveBlackList(@Field("my_id") String myID,
                                                     @Field("yonghu_id") String yonghuID);

    //认证接口
    @FormUrlEncoded
    @POST("RenzhengInq")
    Observable<BaseMainClass> requestApprove(@Field("my_id") String myID,
                                             @Field("title") String title,
                                             @Field("shenfenzheng_id") String idCard,
                                             @Field("name") String name,
                                             @Field("message") String message,
                                             @Field("leixing_Tag") int renzheng_Tag,
                                             @Field("phone") String phone,
                                             @Field("picture") String picture);

    //获取认证信息
    @FormUrlEncoded
    @POST("Renzheng_message")
    Observable<RenzhengMainClass> requestRenzhengMG(@Field("my_id") String myID,
                                                    @Field("leixing_Tag") int renzheng_Tag);

    //获取个人资料
    @FormUrlEncoded
    @POST("Get_Admin_XinxiInq")
    Observable<PrivateMainClass> requestGetPersonalData(@Field("my_id") String myID);


    //修改个人资料
    @FormUrlEncoded
    @POST("Set_Admin_XinxiInq")
    Observable<BaseMainClass> requestSetPersonalData(@Field("my_id") String myID,
                                                     @Field("touxiang") String headImage,
                                                     @Field("name") String name,
                                                     @Field("background") String background,
                                                     @Field("sex") String sex,
                                                     @Field("qianming") String qianming,
                                                     @Field("ali") String ali,
                                                     @Field("weichat") String wechat,
                                                     @Field("phone") String phone,
                                                     @Field("password") String password);

    //修改个人资料
    @FormUrlEncoded
    @POST("Set_Admin_XinxiInq")
    Observable<BaseMainClass> requestSetPersonalNameData(@Field("my_id") String myID,
                                                     @Field("touxiang") String headImage,
                                                     @Field("name") String name,
                                                     @Field("background") String background,
                                                     @Field("sex") String sex,
                                                     @Field("qianming") String qianming,
                                                     @Field("ali") String ali,
                                                     @Field("weichat") String wechat,
                                                     @Field("phone") String phone,
                                                     @Field("password") String password,
                                                         @Field("realName") String realName  );

    //修改个人资料
    @FormUrlEncoded
    @POST("Set_Admin_XinxiInq")
    Observable<BaseMainClass> requestSetPersonalNameData(@Field("my_id") String myID,
                                                         @Field("touxiang") String headImage,
                                                         @Field("name") String name,
                                                         @Field("background") String background,
                                                         @Field("sex") String sex,
                                                         @Field("qianming") String qianming,
                                                         @Field("ali") String ali,
                                                         @Field("weichat") String wechat,
                                                         @Field("phone") String phone,
                                                         @Field("password") String password,
                                                         @Field("realName") String realName,
                                                         @Field("ali_realName") String aliName );

    //获取收货信息
    @FormUrlEncoded
    @POST("Get_Address")
    Observable<PrivateMainClass> requestGetAddress(@Field("my_id") String myID);

    //获取收货信息
    @FormUrlEncoded
    @POST("Set_Address")
    Observable<BaseMainClass> requestSetAddress(@Field("my_id") String myID,
                                                @Field("address") String address,
                                                @Field("name") String name,
                                                @Field("phone") String phone);


    /**
     * 微信支付
     *
     * @param orderContent
     * @param price
     * @return
     */
    @FormUrlEncoded
    @POST("Weixin_Pay_RechargeInq")
    Observable<WXPayResponse> requestWechatPay(@Field("orderContent") String orderContent,
                                               @Field("price") String price,
                                               @Field("my_id") String myID,
                                               @Field("business")int business);

    /**
     * 支付宝支付
     *
     * @param orderContent
     * @param price
     * @param orderName
     * @return
     */
    @FormUrlEncoded
    @POST("Ali_Pay_RechargeInq")
    Observable<AliPayResponse> requestAliPay(@Field("orderContent") String orderContent,
                                             @Field("price") String price,
                                             @Field("orderName") String orderName,
                                             @Field("my_id") String myID,
                                             @Field("business") int business);

    /**
     * 钱包支付
     *
     * @param userId       用户ID
     * @param rewardUserId 敬酒人ID
     * @param price        金额
     * @param type         用途
     * @return
     */
    @FormUrlEncoded
    @POST("PayInq")
    Observable<MessageResponse> requestPay(@Field("my_id") String userId, @Field("duixiang_id") String rewardUserId, @Field("price") String price, @Field("type") String type);


    //充值接口
    @FormUrlEncoded
    @POST("RechargeInq")
    Observable<BaseMainClass> requestRechargeInq(@Field("my_id") String myID,
                                                 @Field("price") String price);

    //改价接口
    @FormUrlEncoded
    @POST("RepriceInq")
    Observable<BaseMainClass> requestRepriceInq(@Field("total_price") String price,
                                                @Field("transaction_id") String id);


    //接单接口
    @FormUrlEncoded
    @POST("JiedanInq")
    Observable<BaseMainClass> requestJiedanInq(@Field("transaction_id") String transactionId);

    //卖家完成
    @FormUrlEncoded
    @POST("Seller_finish")
    Observable<BaseMainClass> requestSellerFinish(@Field("transaction_id") String transactionId);

    //删除订单接口
    @FormUrlEncoded
    @POST("Delete_order")
    Observable<BaseMainClass> requestDelectOrder(
            @Field("transaction_id") String transactionId,
            @Field("my_id") String myId);


    //付款接口
    @FormUrlEncoded
    @POST("Order_PayInq")
    Observable<BaseMainClass> requestOrderPayInq(@Field("transaction_id") String transactionId,
                                                 @Field("price") String price,
                                                 @Field("my_id") String myId
    );

    //买家完成
    @FormUrlEncoded
    @POST("Buyer_finish")
    Observable<BaseMainClass> requestBuyerFinish(@Field("transaction_id") String transactionId);

    //投诉接口
    @FormUrlEncoded
    @POST("ComplaintInq")
    Observable<BaseMainClass> requestComplanintInq(@Field("transaction_id") String transactionId,
                                                   @Field("Complaint_message") String message
    );

    //投诉回复接口
    @FormUrlEncoded
    @POST("Complaint_huifu")
    Observable<BaseMainClass> requestComplanintHuifuInq(@Field("transaction_id") String transactionId,
                                                        @Field("content") String message,
                                                        @Field("my_id") String myId
    );


    //消息接口
    @FormUrlEncoded
    @POST("MessageInq")
    Observable<BaseJson<MessageResult>> requestMessageInq(@Field("my_id") String myId,
                                                          @Field("page") int page);

    //朋友---最受关注
    @FormUrlEncoded
    @POST("Get_Most_attention")
    Observable<BaseJsonList<OtherFriendData>> requestMostAttention(@Field("my_id") String myID,
                                                                   @Field("page") int page);

    //朋友---已认证
    @FormUrlEncoded
    @POST("Get_Authenticated")
    Observable<BaseJsonList<OtherFriendData>> requestAuthenticated(@Field("my_id") String myID,
                                                                   @Field("page") int page);

    //朋友---名人
    @FormUrlEncoded
    @POST("Get_Celebrity")
    Observable<BaseJsonList<OtherFriendData>> requestCelebrity(@Field("my_id") String myID,
                                                               @Field("page") int page);

    //朋友---推荐
    @FormUrlEncoded
    @POST("Get_Most_concerned")
    Observable<BaseJsonList<OtherFriendData>> requestMostFans(@Field("my_id") String myID,
                                                              @Field("page") int page);

    //搜索朋友
    @FormUrlEncoded
    @POST("Sousuo_user_clickInq")
    Observable<BaseJson<OtherFriendData>> searchFriends(@Field("my_id") String myID,
                                                            @Field("page") int page,
                                                            @Field("field") String field,
                                                        @Field("type") int type);


    //钱包详情明细
    @FormUrlEncoded
    @POST("Qianbao_clickInq")
    Observable<BaseMain<WalletDetailData>> walletDetail(@Field("id") String myID
                                      );

    //阅读
    @FormUrlEncoded
    @POST("MessageReadInq")
    Observable<BaseMainClass> requestRead(@Field("msg_id") String msgId);

    //阅读
    @FormUrlEncoded
    @POST("deleteMessageInq")
    Observable<BaseMainClass> deleteMessageInq(@Field("type") String type,
                                               @Field("id") String id);
}
